<?php

namespace Admin\Model;
use Think\Model;
class GoodsModel extends Model{
    
    // 设置自动验证的规则
    protected $_validate = array(
        array('cat_id','0','请选择商品分类','1','notequal'),
        array('goods_name','require','商品名称不能为空'),
        array('market_price','currency','市场价格格式错误'),
        array('shop_price','require','本店价格不能为空'),
        array('shop_price','currency','本店价格格式错误'),
        array('goods_desc','require','商品描述不能为空',1),
    );
}

?>